package com.yizhuoyan.his.webapi.controller.financialstaff;

import com.yizhuoyan.his.ao.RegistrationFreeAo;
import com.yizhuoyan.his.dto.JSONResponse;
import com.yizhuoyan.his.dto.ListCostDto;
import com.yizhuoyan.his.service.financialstaff.RegistrationFeeService;
import com.yizhuoyan.his.webapi.controller.financialstaff.vo.RegistrationFeeVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class RegistrationFeeController {
    @Autowired
    RegistrationFeeService service;

    @PostMapping("/api/modifyCaseCost/")
    public JSONResponse modifyCaseCost(RegistrationFreeAo ao)throws Exception{
        ListCostDto dto=service.queryPatientCostByCaseNo(ao);
        return JSONResponse.ok(RegistrationFeeVo.of(dto));
    }
}
